package com.dis.resource.mapper;

import com.dis.pojo.entity.ChronicDiseaseTypeRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ChronicDiseaseTypeRelationMapper {
    /**
     * 插入联系
     * @param relation
     */
    void insert(ChronicDiseaseTypeRelation relation);

    /**
     * 修改联系表
     * @param diseaseId
     * @param typeId
     */
    @Update("update chronic_disease_type_relation set type_id = #{typeId} where disease_id = #{diseaseId}")
    void updateByDiseaseId(@Param("diseaseId")  Long diseaseId ,@Param("typeId") Long typeId);
}
